﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BusinessLayer;

namespace PresentationLayer
{
    public partial class AlterarObra : Form
    {
        public AlterarObra()
        {
            InitializeComponent();
        }

        private void Alterar_Click(object sender, EventArgs e)
        {
            this.textIdObra.SelectAll();
            this.comboBox1.SelectAll();
            this.textOficina.SelectAll();

            if(this.textIdObra.SelectedText != "" && this.comboBox1.SelectedText != "" && this.textOficina.SelectedText != ""){
             if(ObraActions.AlteraObra(this.textIdObra.SelectedText,this.comboBox1.SelectedText,this.dateTimePicker1.Value, this.textOficina.SelectedText)){
                this.Close();
             }
            }
        }
    }
}
